package com.njwb.controller;

import com.njwb.json.ResponseResult;
import com.njwb.pojo.Emp;
import com.njwb.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class EmpController {
    @Autowired
    private EmpService empService;
    @PostMapping("emp")
    public ResponseResult add(Emp emp){
        empService.add(emp);
        return ResponseResult.success();
    }
}